import React, { Component } from 'react';
import { Modal, Form, message, Radio, Button, Icon, Input, Col, Row } from 'antd';

const FormItem = Form.Item;
const RadioGroup = Radio.Group;
export default class NewForm extends Component {
  state = {
    value: 1,
  };

  onChange = e => {
    //console.log('radio checked', e.target.value);
    this.setState({
      value: e.target.value,
    });
  };

  render() {
    const { modalVisible, form, handleModalVisible } = this.props;
    return (
      <Modal
        title="新建节目"
        visible={modalVisible}
        onOk={this.handleUpload}
        onCancel={() => handleModalVisible(false)}
      >
        <Form>
          <FormItem labelCol={{ span: 5 }} wrapperCol={{ span: 15 }} label="类型">
            <RadioGroup onChange={this.onChange} value={this.state.value}>
              <Radio value={1}>商业</Radio>
              <Radio value={2}>插播</Radio>
            </RadioGroup>
          </FormItem>
          <FormItem labelCol={{ span: 5 }} wrapperCol={{ span: 15 }} label="名称">
            <Input placeholder="请输入" />
          </FormItem>
          <Row span={20}>
            <Col span={8}>
              <FormItem label="宽">
                <Input placeholder="请输入" />
              </FormItem>
            </Col>
            <Col span={8}>
              <FormItem label="宽">
                <Input placeholder="请输入" />
              </FormItem>
            </Col>
          </Row>
        </Form>
      </Modal>
    );
  }
}
